class Solution {

public:
    int findClosest(int x, int y, int z) {
        
        int nRet=0;
        if(abs(x-z)<abs(y-z)){
            nRet=1;
        }
        else if(abs(x-z)>abs(y-z)){
            nRet=2;
        }
        
        return nRet
    }
};
